﻿@model ApplicationDto

<style>
    .mat-column-code {
        max-width: 10%;
    }

    .mat-column-name {
        max-width: 20%;
    }

    .mat-column-comment {
        max-width: 30%;
    }

    .mat-column-enabled {
        max-width: 120px;
    }

    .mat-column-registerEnabled {
        max-width: 120px;
    }

    .mat-column-creationTime {
        max-width: 100px;
    }

    .mat-column-operation {
        max-width: 140px;
    }

    .mat-expansion-panel {
        margin-bottom: 10px;
    }
</style>
<util-accordion>
    <util-panel expanded="true">
        <util-panel-header>
            测试
        </util-panel-header>
        <util-panel-content>
            <util-layout gap="20px">
                <util-button styles="Raised" color="Primary" text="测试" ></util-button>
                <util-button styles="Raised" color="Primary" text="测试2" ></util-button>
            </util-layout>
        </util-panel-content>
    </util-panel>
</util-accordion>
<util-toolbar>
    <util-layout>
        <util-textbox model="queryParam.keyword" placeholder="搜索" on-change="search()"></util-textbox>
    </util-layout>
    <util-layout>
        <util-a styles="Icon" tooltip="添加应用程序" link="create">
            <util-icon font-awesome-icon="Plus"></util-icon>
        </util-a>
        <util-button styles="Icon" tooltip="批量删除" on-click="delete()">
            <util-icon material-icon="Delete"></util-icon>
        </util-button>
        <util-button styles="Icon" tooltip="刷新" on-click="refresh()">
            <util-icon material-icon="Sync"></util-icon>
        </util-button>
    </util-layout>
</util-toolbar>
<util-table  id="tableApplication" query-param="queryParam" on-query-restore="restoreQueryParam($event)" base-url="application"
            sort="CreationTime" sort-direction="Desc" max-height="700" style="margin: 20px">
    <util-table-column type="Checkbox"></util-table-column>
    <util-table-column type="LineNumber"></util-table-column>
    <util-table-column for="Code" sort="true"></util-table-column>
    <util-table-column for="Name" sort="true"></util-table-column>
    <util-table-column for="Comment" sort="true"></util-table-column>
    <util-table-column for="Enabled" sort="true"></util-table-column>
    <util-table-column for="RegisterEnabled" sort="true"></util-table-column>
    <util-table-column for="CreationTime" sort="true"></util-table-column>
    <util-table-column title="操作" column="operation">
        <util-table-cell>
            <util-a styles="Icon" tooltip="编辑" bind-link="['edit',row.id]">
                <util-icon material-icon="Edit"></util-icon>
            </util-a>
            <util-button styles="Icon" tooltip="删除" on-click="delete(row.id)">
                <util-icon material-icon="Delete"></util-icon>
            </util-button>
            <util-a styles="Icon" tooltip="查看详细" bind-link="['detail',row.id]">
                <util-icon material-icon="Visibility" ></util-icon>
            </util-a>
        </util-table-cell>
    </util-table-column>
</util-table>

<p-treeTable [value]="files" selectionMode="checkbox" [(selection)]="selectedFiles">
    <p-column field="name" header="姓名"></p-column>
    <p-column field="size" header="大小"></p-column>
    <p-column field="type" header="类型"></p-column>
</p-treeTable>
